import request from '@/utils/request'
import { download } from '@/utils/request'


// 查询当前约会记录状态
export function getAppointment(id) {
  return request({
    url: '/businessCore/faUserMeet/getUserMeetRecordListByMeetId/' + id,
    method: 'get'
  })
}

// 后台人员确认见面时间地点
export function confirmAppointment(data) {
  return request({
    url: '/businessCore/faUserMeet/updateUserMeetDataById',
    method: 'put',
    data
  })
}
// 后台人员签到
export function signAppointment(data) {
  return request({
    url: '/businessCore/faUserMeet/adminSignById',
    method: 'put',
    data
  })
}
// 后台人员进行约会回访
export function callbackAppointment(data) {
  return request({
    url: '/businessCore/faUserMeet/updateFollowUpStatusById',
    method: 'put',
    data
  })
}

// 获取后台人员列表
export function getBackendUserList(data) {
  return request({
    url: '/businessCore/faUserMeet/getSysUserList',
    method: 'get',
    data
  })
}

// 删除约会管理
export function delAppointment(id) {
  return request({
    url: '/businessCore/faUserMeet/' + id,
    method: 'delete'
  })
}

// 导出约会管理
export function exportAppointment(params, fileName) {
  const url = '/businessCore/faUserMeet/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}